/*
 * Copyright 2003-2007 (c) Live Media Pty Ltd. <argot@einet.com.au> 
 *
 * This software is licensed under the Argot Public License 
 * which may be found in the file LICENSE distributed 
 * with this software.
 *
 * More information about this license can be found at
 * http://www.einet.com.au/License
 * 
 * The Developer of this software is Live Media Pty Ltd,
 * PO Box 4591, Melbourne 3001, Australia.  The license is subject 
 * to the law of Victoria, Australia, and subject to exclusive 
 * jurisdiction of the Victorian courts.
 */

package com.colony.zone.process;

import java.net.URISyntaxException;

import com.colony.concurrent.SystemThreadPool;
import com.colony.concurrent.ThreadPool;

import com.colony.zone.CRL;
import com.colony.zone.ISystemRealm;
import com.colony.zone.ZoneException;

public class SystemRealm 
extends HashMapRealm
implements ISystemRealm
{
	private ThreadPool _threadPool;
	
	public SystemRealm(String host)
	throws ZoneException
	{
		_threadPool = SystemThreadPool.getThreadPool();
		try {
			CRL hostCRL = new CRL(host,"/");
			this.bind(hostCRL, null);
		} catch (URISyntaxException e) {
			throw new ZoneException("Invalid host supplied",e);
		}
	}
	
	public ThreadPool getThreadPool()
	{
		return _threadPool;
	}
}
